import React from 'react'
import {View, Text, Image, ScrollView,Radio } from '@tarojs/components'
import {AtIcon } from 'taro-ui'
export default function AddressInfo(){

  // 删除地址
  function deleteAddress(){
    console.log('删除')
  }
  // 编辑地址
  function editAddress(){
    console.oog('编辑')
  }
  return (
    <View className='address_info'>
      {/*没有地址*/}
      {/*<View className='no_address'>*/}
      {/*  <Image src={require('../../../static/images/noAddress.png')} />*/}
      {/*</View>*/}
      {/*有地址*/}
      <ScrollView scrollY  className='have_address'>
        <View className='have_address_item'>
          <View className='have_address_deta'>
            <Text className='data_one'>收货人: </Text>
            <Text>吴彦祖</Text>
          </View>
          <View className='have_address_deta'>
            <Text  className='data_one'>收货地址: </Text>
            <Text>北京</Text>
          </View>
          <View className='have_address_deta'>
            <Radio />
            <Text>设为默认</Text>
            <View className='data_cz'>
              <View onClick={() => {editAddress()}}>
                <AtIcon value='edit' size='20' color='#333' />
                <Text>编辑</Text>
              </View>
              <View onClick={() => {deleteAddress()}}>
                <AtIcon value='trash' size='20' color='#333' />
                <Text>删除</Text>
              </View>
            </View>
          </View>
        </View>
        <View className='have_address_item'>
          <View className='have_address_deta'>
            <Text className='data_one'>收货人: </Text>
            <Text>吴彦祖</Text>
          </View>
          <View className='have_address_deta'>
            <Text  className='data_one'>收货地址: </Text>
            <Text>北京</Text>
          </View>
          <View className='have_address_deta'>
            <Radio />
            <Text>设为默认</Text>
            <View className='data_cz'>
              <View onClick={() => {editAddress()}}>
                <AtIcon value='edit' size='20' color='#333' />
                <Text>编辑</Text>
              </View>
              <View onClick={() => {deleteAddress()}}>
                <AtIcon value='trash' size='20' color='#333' />
                <Text>删除</Text>
              </View>
            </View>
          </View>
        </View>
      </ScrollView>
    </View>
  )
}
